package com.manner.groupon.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 规格值表
 * @TableName tb_spec_values
 */
@TableName(value ="tb_spec_values")
@Data
public class SpecValues extends Object implements Serializable {
    /**
     * 规格值编号,自增唯一标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 外键商品编号
     */
    @TableField(value = "gid")
    private Integer gid;

    /**
     * 规格JSON字符串
     */
    @TableField(value = "spec_json")
    private Object specJson;

    /**
     * 规格组合价格
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 划线价格
     */
    @TableField(value = "crossed_price")
    private BigDecimal crossedPrice;

    /**
     * 规格组合库存
     */
    @TableField(value = "stock")
    private Integer stock;

    /**
     * 创建时间
     */
    @TableField(value = "created_time")
    private Date createdTime;

    /**
     * 更新时间
     */
    @TableField(value = "updated_time")
    private Date updatedTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}